﻿/****************
* Authored by Zhuo "Wizcas" Chen
* 2018 © Wubi.fun all rights reserved
*****************/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Ending : MonoBehaviour 
{
    [SerializeField] Text _score;

    public void Show(int score)
    {
        gameObject.SetActive(true);
        _score.text = score.ToString();
    }

    public void Hide()
    {
        gameObject.SetActive(false);
    }

    public void Restart() { Hide(); Game.instance.StartGame(Game.instance.isTimeChallenge); }
    public void BackToMain() { Hide(); Game.instance.ToMainMenu(); }
}
